package com.zzy.study.antJunit;

import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;


public class ADemoTest {
	private AntDemo ad = null;

	@Before
	public void setUp() {
		this.ad = new AntDemo();
	}

	@Test
	public void testCheckNonNull() {
		assertNotNull("结果为null", this.ad.checkNonNull());
	}

	@Test
	public void testCheckNull() {
		assertNull("结果不为null", this.ad.checkNull());
	}

	@Test(expected = RuntimeException.class)
	public void testCheckException() {
		this.ad.checkException();
	}

	@After
	public void tearDown() {
		this.ad = null;
	}
}